import {
  Column,
  CreateDateColumn,
  Entity,
  PrimaryGeneratedColumn,
} from 'typeorm';

@Entity({
  name: 'results',
})
export class Result {
  @PrimaryGeneratedColumn()
  id: number;

  @Column()
  userId: number;

  @Column()
  userName: string;

  @Column({
    comment: '错误数',
  })
  errorNum: number;

  @Column({
    length: 50,
    comment: '耗时',
  })
  time: string;

  @CreateDateColumn()
  createTime: Date;
}
